-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GH-429] Dungeon Settlement Levels #593
Conversation
Co-authored-by: Nicolas Continanza <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
||
Returns the updated user if the operation was successful. | ||
""" | ||
def level_up_dungeon_settlement(user_id, level_up_costs) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the same as level_up_kaline_tree
? just changing the increment_settlement_level
right?
get_user(user_id) | ||
end | ||
|
||
defp increment_settlement_level(user_id) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! tested and the currencies can be claimed without issues 🪨
Motivation
Adds DungeonSettlementLevels to Users
Closes https://github.com/lambdaclass/champions_of_mirra/issues/429
Summary of changes
How to test it?
You can create a user and check that his dungeon_settlement_level is instantiated at level 1.
If you give your user 50 "Blueprints" (using
GameBackend.Users.Currencies.add_currency_by_name!/3
), you will be able to level up the dungeon settlement of your user withChampions.Users.level_up_dungeon_settlement/1
. If you get your user again (Champions.Users.get_user_by_username/1
) you will be able to see that his dungeon_settlement_level has increased, and his "Gold" and "Blueprints" currencies decreased!Since this implements protobuf messages, this PR also adds SocketTester messages! You can also try those :P